import Vue from 'vue'
import Router from 'vue-router'

//登陆
import Login from "../components/Login";

//超管
import CustomerToAdministrator from "../components/Administrator/CustomerToAdministrator";
import GoodsToAdministrator from "../components/Administrator/GoodsToAdministrator";
import IndexOfAdministrator from "../components/Administrator/IndexOfAdministrator";
import ManageCragoToAdministrator from "../components/Administrator/ManageCragoToAdministrator";
import ManageOrderToAdministrator from "../components/Administrator/ManageOrderToAdministrator";
import ShopOwner from "../components/Administrator/ShopOwner";
import ShopToAdministrator from "../components/Administrator/ShopToAdministrator";
import ViewCragoToAdministrator from "../components/Administrator/ViewCragoToAdministrator";
import ViewOrderToAdministrator from "../components/Administrator/ViewOrderToAdministrator";
import WarehouseToAdministrator from "../components/Administrator/WarehouseToAdministrator";
import AddLog from "../components/Administrator/AddLog";
//顾客
import IndexOfCustomer from "../components/Customer/IndexOfCustomer";
import Shopping from "../components/Customer/Shopping";
import ViewCragoToCustomer from "../components/Customer/ViewCragoToCustomer";
import ViewOrderToCustomer from "../components/Customer/ViewOrderToCustomer";
import ViewShop from "../components/Customer/ViewShop";
import ViewShopOwner from "../components/Customer/ViewShopOwner";

//店铺主
import CustomerToShopOwner from "../components/ShopOwner/CustomerToShopOwner";
import GoodsToShopOwner from "../components/ShopOwner/GoodsToShopOwner";
import indexOfShopOwner from "../components/ShopOwner/indexOfShopOwner";
import ManageCragoToShopOwner from "../components/ShopOwner/ManageCragoToShopOwner";
import ManageOrderToShopOwner from "../components/ShopOwner/ManageOrderToShopOwner";
import ShopToShopOwner from "../components/ShopOwner/ShopToShopOwner";

import WarehouseToShopOwner from "../components/ShopOwner/WarehouseToShopOwner";

import ViewLogistics from "../components/ShopOwner/ViewLogistics";

Vue.use(Router)

export default new Router({
  routes: [
    {
      path:'/',
      name:'Login',
      component:Login
    },
    {
      path:'/IndexOfCustomer',
      name:'IndexOfCustomer',
      component:IndexOfCustomer,
      children:
      [
        {
          path: '/ViewShop',
          name: 'ViewShop',
          component: ViewShop,
        },{
          path: '/ViewShopOwner',
          name: 'ViewShopOwner',
          component: ViewShopOwner,
        },{
          path: '/Shopping' ,
          name: '/Shopping',
          component: Shopping
        },{
          path: '/ViewOrderToCustomer' ,
          name: '/ViewOrderToCustomer',
          component: ViewOrderToCustomer
        },{
          path: '/ViewCragoToCustomer' ,
          name: 'ViewCragoToCustomer',
          component: ViewCragoToCustomer
        }
      ]
    },
    {
      path:'/indexOfShopOwner',
      name:'indexOfShopOwner',
      component:indexOfShopOwner,
      children:
      [
        {
          path: '/ViewLogistics' ,
          name: 'ViewLogistics',
          component: ViewLogistics
        },
        {
          path: '/WarehouseToShopOwner' ,
          name: 'WarehouseToShopOwner',
          component: WarehouseToShopOwner
        },
       {
          path: '/GoodsToShopOwner' ,
          name: 'GoodsToShopOwner',
          component: GoodsToShopOwner
        },{
          path: '/ShopToShopOwner' ,
          name: 'shopToShopOwner' ,
          component: ShopToShopOwner
        },{
          path: '/CustomerToShopOwner' ,
          name: 'CustomerToShopOwner',
          component: CustomerToShopOwner
        },{
          path: '/ManageOrderToShopOwner' ,
          name: 'ManageOrderToShopOwner',
          component: ManageOrderToShopOwner
        },{
          path: '/ManageCragoToShopOwner',
          name: 'ManageCragoToShopOwner',
          component: ManageCragoToShopOwner
        }
      ]
    },
    {
      path:'/indexOfAdministrator',
      name:'indexOfAdministrator',
      component:IndexOfAdministrator,
      children:
      [{
        path: '/AddLog' ,
        name: 'AddLog',
        component: AddLog
      },
        {
          path: '/WarehouseToAdministrator' ,
          name: 'WarehouseToAdministrator',
          component: WarehouseToAdministrator
        },{
          path: '/GoodsToAdministrator' ,
          name: 'GoodsToAdministrator',
          component: GoodsToAdministrator
        },{
          path: '/ShopToAdministrator' ,
          name: 'shopToAdministrator' ,
          component: ShopToAdministrator
        },{
          path: '/ShopOwner' ,
          name: 'ShopOwner' ,
          component: ShopOwner
        },{
          path: '/CustomerToAdministrator' ,
          name: 'CustomerToAdministrator',
          component: CustomerToAdministrator
        },{
          path: '/Shopping' ,
          name: '/Shopping',
          component: Shopping
        },{
          path: '/ViewOrderToAdministrator' ,
          name: '/ViewOrderToAdministrator',
          component: ViewOrderToAdministrator
        },{
          path: '/ManageOrderToAdministrator' ,
          name: 'ManageOrderToAdministrator',
          component: ManageOrderToAdministrator
        },{
          path: '/ViewCragoToAdministrator' ,
          name: 'ViewCragoToAdministrator',
          component: ViewCragoToAdministrator
        },{
          path: '/ManageCragoToAdministrator',
          name: 'ManageCragoToAdministrator',
          component: ManageCragoToAdministrator,
        }
      ]
    }
  ]
})
